import { ModuleWithProviders, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { NgZorroAntdModule } from 'ng-zorro-antd';

import { pipes } from './pipes';
import { services } from './services';
import { guards } from './guards';
import { components } from './components';

@NgModule({
  imports: [
    CommonModule,
    RouterModule,
    NgZorroAntdModule
  ],
  declarations: [...pipes, ...components],
  exports: [...pipes, ...components]
})
export class SharedModule { 
  static forRoot(): ModuleWithProviders {
    return {
      ngModule : SharedModule,
      providers: [ ...services, ...guards ] // Services
    };
  }
}
